Windows 95 Trackbar Control for Delphi (16-bit) This Windows 95 trackbar (slider) component uses the Windows 95 CUSTCNTL.DLL, which is probably in your WINDOWS\SYSTEM directory to provide it's functionality. It probably requires windows 95 to run... Programmed be Colin Wilson (colin@woozle.compulink.co.uk). Freeware. Public methods -------------- procedure SetTic (position : LongInt); Places a tick mark at the specified position. function GetTic (index : Integer) : LongInt; Gets the position of the tick mark 'index', where 0 is the first mark, 1 is the second, etc. function GetTicPos (index : Integer) : LongInt; Gets ths physical position in screen coordinates of the tick mark 'index' procedure ClearTics (Redraw : boolean); Clears all tick marks. function GetNumTics : Integer; Gets the number of tick marks. procedure ClearSelection (Redraw : boolean); Clears the SelectionStart and SelectionEnd properties. (see below). procedure GetThumbRect (var Rect : TRect); Gets the rectangle containing the 'thumb' (the bit that slides). procedure GetChannelRect (var Rect : TRect); Gets the rectangle of the channel in which the thumb slides. published properties -------------------- property Min : LongInt; The minimum value of the slider. property Max : LongInt; The maximum position of the slider. property SelectionStart : LongInt; The start position of the current selection. Must be <= SelectionEnd below. property SelectionEnd : LongInt; The end position of the current selection. Must be >= SelectionStart above. property Position : LongInt; The current position of the thumb. property TickFreq : Integer; Controls how often a tick is displayed if the tbAutoticks style (below) is set. property Style : tbStyles read Styles write SetStyles; The following styles can be set to control how the slider is displayed: tbAutoticks : Automatically display tick marks, based on the TickFreq property above. tbVert : Display a vertical slider. tbReversed : Reverse the direction of the thumb arrow. tbBoth : Display a rectangular - rather than an arrow - thumb. tbNoTicks : Don't display any ticks. tbEnableSelRange : Display a wide channel, even if the SelectionStart and SelectionEnd properties are equal. tbFixedLength : ??? tbNoThumb : Don't display a thumb - handy if you just want to display a selection. property PageSize : LongInt The number of positions the thumb is moved if you press the Page Up & Page Down keys. Defaults to 2. property LineSize : LongInt The number of positions the thumb is moved if you press the Up & Down arrow keys. Defaults to 1. property ThumbLength : Integer Controls the size of the thumb. property Visible; (Standard property) Determines whether the control is visible. property Enabled; (Standard property) Determines whether the control is enabled. Published Events ---------------- property OnLineUp : TNotifyEvent Generated when you press the up-arrow key. property OnLineDown : TNotifyEvent Generated when you press the down-arrow key. property OnPageUp : TNotifyEvent Generated when you press the Page Up key. property OnPageDown : TNotifyEvent Generated when you press the Page Down key. property OnThumbPosition : TNotifyEvent Generated when the thumb's position changes. property OnThumbTrack : TNotifyEvent Generated as the thumb is moved with the mouse. property OnTop : TNotifyEvent Generated when the thumb reaches the top or left of the slider. property OnBottom : TNotifyEvent Generated when the thumb reaches the bottom or right of the slider. property OnEndTrack : TNotifyEvent Generated when the mouse is released after moving the thumb, or if the thumb moves for any other reason. This is the most useful of the thumb position events. property OnEnter (Standard property) property OnExit; (Standard property) property OnDragDrop; (Standard property) property OnDragOver; (Standard property) property OnEndDrag; (Standard property) property OnKeyDown; (Standard property) property OnKeyPress; (Standard property) property OnKeyUp; (Standard property)